<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%if(session.getAttribute("userName")!=null){ 
    	response.sendRedirect(request.getContextPath()+"/pages/admin/admin.jsp");
    	System.out.println(session.getAttribute("userName")); 
    }
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录页</title>
	<link href="<%=request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<style type="text/css"> 
<!--
body,td,th {
	font-size: 9pt;
}
.border-l-b-r-t {
	BORDER-RIGHT: #cecfce 1px solid; BORDER-TOP: #cecfce 1px solid; BORDER-LEFT: #cecfce 1px solid; BORDER-BOTTOM: #cecfce 1px solid
}
.main_table{
      font-size:12px;
}
.main_table input{
   border:1px FF9900 solid;
   background:#f9b88a;
 
 
}
 
.main_table textarea{
   border:1px FF9900 solid;
   background:#f9b88a;
 
 
}
-->
</style>
 
<!-- 添加留言 -->
<script language="javascript"> 
<!--
	function check()
	{
		if (form1.userName.value=="")
		{
			alert("姓名不能为空！");
			form1.userName.focus();
			return false;
		}
	 
		if (form1.password.value=="")
		{
			alert("密码不能为空！");
			form1.password.focus();
			return false;
		}
		return true;
	}
	function login(){
		if(check()){
			document.form1.action = "UserServlet.do?method=login";
			document.form1.submit();
		}
	}
-->
</script>

<FORM name="form1" method="post" onSubmit="login()">
<table width="100%" border="0" align="center"  cellspacing="0" class="main_table" background="<%=request.getContextPath() %>/images/foot_19.gif">
      <TR>
      <td height="42" colspan="2">&nbsp;</td>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">用户名： </TD>
        <TD width="93%">
        <INPUT name=userName class=inputstyle id="userName">
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">密码： </TD>
        <TD width="93%"><INPUT type ="password"
                      name=password class=inputstyle id="password"></TD>
      </TR>
      <TR>
        <TD noWrap height=36 colspan="2" align="center">
        <INPUT type=submit value="登录" name=Submit></TD>
</tr>
</table>
  </FORM>

</body>
</html>